finding points of intersection